package com.example.webdemo.service;

import com.example.webdemo.bean.City;
import com.example.webdemo.mapper.Citymapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Date 2021/6/26 10:54
 * @Created by wangle
 * @Description
 */
@Service
public class CityService {
    @Autowired
    Citymapper citymapper;

    public City GetcityById(int id){
     return citymapper.getByid(id);
    }

    public  int saveCity(City city){
      return   citymapper.insertId(city);
    }

}
